package com.fly.common.exception;


import com.fly.common.common.ErrorConstant;

/**
 * @description 业务异常
 * @author: fly
 * @date: 2018/11/22 10:42
 */
public class BusinessException extends RuntimeException {

    /**
     * 错误码
     */
    private int errorCode = ErrorConstant.SUCCESS;

    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }

    public BusinessException(int errorCode, String message) {
        super(message);
        this.errorCode = errorCode;
    }

    public BusinessException(int errorCode, String message, Throwable cause) {
        super(message, cause);
        this.errorCode = errorCode;
    }
}
